package com.chub.statemachine.fsm;

/**
 * @author : chub
 * @version : V1.0.0
 * @fileName : StateMachineException.java
 * @description : TODO
 * @createTime : 2025-04-15 15:58
 */

public class StateMachineException extends RuntimeException {
    private PaymentStatus currentStatus;
    private PaymentEvent event;

    public StateMachineException(PaymentStatus currentStatus, PaymentEvent event, String message) {
        super(message);
        this.currentStatus = currentStatus;
        this.event = event;
    }


    @Override
    public String toString() {
        return "StateMachineException{" + "code=" + currentStatus.getStatus() + ", message=" + this.getMessage() + '}';
    }
}
